<?php
/**
 * Created by 项目.
 * User: xuguopeng
 * Date: 2020-06-18
 * Time: 17:17
 */

namespace app\api\validate\coupon;


use LinCmsTp5\validate\BaseValidate;

class CheckCoupon extends BaseValidate
{
    protected $rule = [
        'title' => 'require|max:50',
        'money' => 'require|float',
        'price' => 'require|float',
        'number' => 'require|isPositiveInteger',
        'start_time' => 'require|dateFormat:Y-m-d H:i:s',
        'end_time' => 'require|dateFormat:Y-m-d H:i:s',
    ];

    protected $message = [
        'title' => '请输入优惠券标题且长度不大于50',
        'money' => '请输入正确的满额金额',
        'price' => '请输入正确的满金额',
        'start_time' => '请选择正确的开始时间',
        'end_time' => '请输入正确的结束时间',
        'number' => '请输入正确的数量',
    ];
}